package com.softserveinc.edu.oms.persistence.dao.concrete;

import java.util.List;

import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;

import com.softserveinc.edu.oms.persistence.entities.OrderStatus;
import com.softserveinc.edu.oms.persistence.dao.HibernateDao;

public class OrderStatusDao extends HibernateDao<OrderStatus> {

	public OrderStatusDao(final SessionFactory sessionFactory) {
		super(OrderStatus.class, sessionFactory);
	}

	public List<OrderStatus> findOrderStatusByName(final String orderStatusName) {
		List<OrderStatus> statuses = findByCriterions(Restrictions.eq(
				"orderStatusName", orderStatusName));
		return statuses;
	}
	
	/*
    public List<OrderStatus> findOrderStatusByName(
            final OrderStatusEnum orderStatusType) {
    List<OrderStatus> statuses = findByCriterions(Restrictions.eq(
                    "orderStatusName", orderStatusType.getValue()));
    return statuses;
    }
    */
    
}
